-- UNITDEF -- kawnfire_ii --
--------------------------------------------------------------------------------

local unitName = "kawnfire_ii"

--------------------------------------------------------------------------------

local unitDef = 
{
  acceleration       = 1,
  brakeRate          = 1,
  buildCostMetal     = 10,
  canAttack          = true,
  canMove            = true,
  canstop            = 1,
  category           = [[kawn UNARMORED UNIT TARGET]],
  collisionvolumetest = 1,
  corpse              = [[DEAD]],
  description        = [[Support Lv 2]],
  energyMake         = 0,
  energyStorage      = 0,
  explodeAs          = [[Death]],
  footprintX         = 2,
  footprintZ         = 2,
  iconType           = [[grunt]],
  idleAutoHeal       = 10,
  idleTime           = 300,
  levelGround        = false,
  maxDamage          = 225,
  maxVelocity        = 2,
  metalMake          = 0,
  metalStorage       = 0,
  movementClass      = [[medium]],
  name               = [[Adv Armored Personel Carrier]],
  noChaseCategory    = [[NOTARGET AIR]],
  objectName         = [[kawnfire_i.s3o]],
  radarDistance      = 0,
  reclaimable        = false,
  seismicSignature   = 1,
  selfDestructAs     = [[Death]],
  selfDestructCountdown = 1,
  showNanoFrame      = false,
  sightDistance      = 800,
  smoothAnim         = false,
  turnRate           = 1000,
  unitname           = [[kawnfire_ii]],
  upright            = false,
  sfxtypes = 
	{
    explosiongenerators = {
	[[custom:flashmuzzle1]],
	[[custom:flashmuzzle0]],
	[[custom:burning]],
	},
	},
  -- sounds = 
	-- {
		-- arrived = 
		-- {
			-- [[commandgiven]],
		-- },
		-- ok = 
		-- {
			-- [[commandgiven]],
		-- },
		-- select = 
		-- {
			-- [[select]],
		-- },
	-- },
  weapons = {
    [1]  = {
      def                = [[fiiwep1]],
	   badTargetCategory  = [[NOTARGET AIR]],
      onlyTargetCategory = [[TARGET]],
    },
  },
}


--------------------------------------------------------------------------------

local weaponDefs = {
  fiiwep1 = {
id                 = 2,
	    avoidFriendly      = false,
    burst              = 6,
    burstrate          = .2,
    collideFriendly    = false,
    craterBoost        = 0,
    craterMult         = 0,
    duration           = .03,
    explosionGenerator = [[custom:none]],
    id                 = 1,
    impactonly         = 1,
    impulseBoost       = 0,
    impulseFactor      = 0,
    name               = [[Auto Cannon]],
    range              = 880,
    reloadtime         = 3,
    rgbColor           = [[.5 1 .2]],
	texture1 = bullet,
	texture2 = bullet,
	texture3 = bullet,
    soundStart         = [[gunfire]],
    sprayAngle         = 800,
    thickness          = 1,
    tolerance          = 1000,
    turret             = true,
    weaponType         = [[LaserCannon]],
    weaponVelocity     = 1000,
	InterceptedByShieldType = 2,
    damage = {
      default            = 15,
    },
  },
  }
unitDef.weaponDefs = weaponDefs

local featureDefs = {
    DEAD  = {
      description      = [[Wreckage - Fire]],
      blocking         = true,
      category         = [[corpses]],
      damage           = 1000,
      energy           = 0,
	  featureDead      = [[HEAP]],
      featurereclamate = [[SMUDGE01]],
      footprintX       = 2,
      footprintZ       = 2,
      height           = [[20]],
      hitdensity       = [[100]],
      metal            = 0,
      object           = [[kawnfire_i_dead.s3o]],
      reclaimable      = false,
      reclaimTime      = 0,
      world            = [[All Worlds]],
    },
	
	 HEAP  = {
      description      = [[Debris - Fire]],
      blocking         = true,
      category         = [[heaps]],
      damage           = 500,
      energy           = 0,
      featurereclamate = [[SMUDGE01]],
      footprintX       = 2,
      footprintZ       = 2,
      height           = [[4]],
      hitdensity       = [[100]],
      metal            = 0,
      object           = [[truck_heap.s3o]],
      reclaimable      = false,
      reclaimTime      = 0,
      seqnamereclamate = [[TREE1RECLAMATE]],
      world            = [[All Worlds]],
    },
  }
  unitDef.featureDefs = featureDefs
--------------------------------------------------------------------------------

return lowerkeys({ [unitName] = unitDef })

--------------------------------------------------------------------------------
